<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<%@ taglib prefix="his_fns" uri="/WEB-INF/tlds/his_fns.tld" %>


   <form:form id="inputForm" data-parsley-validate="" modelAttribute="turnInVo"  onsubmit="return saveTurnInLoad('mainCenterDiv','inputForm','${ctx}/doctor/medicalRecord/turnIn','${ctx}/doctor/patVisit/index');" method="post" class="form-horizontal">
           <form:hidden path="id"></form:hidden>
           <form:hidden path="patVisitId"/>
           <form:hidden path="patientId"/>
           <div class="form-group">
               <label class="col-sm-2 control-label">身份证号：</label>
               <div class="col-sm-4">
                   <form:input path="idNo" id="idNo" htmlEscape="false" class="form-control"  maxlength="21" />
               </div>
               <span class="help-inline">输入正确格式的身份证号，按回车键进行检索</span>
           </div>
           <div class="form-group">
                   <label class="col-sm-2 control-label">姓名：</label>
                   <div class="col-sm-4">
                       <form:input path="name" id="name" htmlEscape="false" class="form-control"  data-parsley-required="true" maxlength="200" readonly="true"/>
                   </div>
                   <label class="col-sm-2 control-label">性别：</label>
                   <div class="col-sm-4">
                       <form:select path="sex" id="sex" class="form-control" data-parsley-required="true"  disabled="true">
                           <form:options items="${fns:getDictList('SEX_DICT')}" itemLabel="label" itemValue="value"  htmlEscape="false"/>
                       </form:select>
                   </div>
           </div>

           <div class="form-group">
               <label class="col-sm-2 control-label">入住科室：</label>
               <div class="col-sm-4">
                   <input type="hidden" name="deptStayed"  id="deptId" value="${turnInVo.dept.id}">
                   <input  class="form-control" value="${turnInVo.dept.deptName}" readonly/>

               </div>
               <label class="col-sm-2 control-label">病情：</label>
               <div class="col-sm-4">
                   <form:select path="situationType" id="situationType" class="form-control" data-parsley-required="true">
                       <form:options items="${fns:getDictList('PATIENT_STATUS_DICT')}" itemLabel="label" itemValue="value"  htmlEscape="false"/>
                   </form:select>
               </div>
           </div>
           <div class="form-group">
              <%-- <label class="col-sm-2 control-label">护理等级：</label>
               <div class="col-sm-4">
                   <form:select path="nursingClass" id="nursingClass" class="form-control" data-parsley-required="true">
                       <form:options items="${fns:getDictList('NURSING_CLASS_DICT')}" itemLabel="label" itemValue="value"  htmlEscape="false"/>
                   </form:select>
               </div>--%>
               <label class="col-sm-2 control-label">医生：</label>
               <div class="col-sm-4">
                   <form:hidden path="doctorInCharge" value="${user.id}"/>
                   <input id="doctorInCharge" htmlEscape="false" class="form-control"  maxlength="21" readonly="true" value="${user.name}"/>
               </div>
                  <label class="col-sm-2 control-label">上级医生：</label>
                  <div class="col-sm-4">

                      <select name="upperDoctor" class="form-control" data-parsley-required="true">
                          <c:forEach items="${users}" var="u">
                              <option value="${u.id}" <c:if test="${turnInVo.directorDoctor eq u.id}" >selected</c:if>>${u.name}</option>
                          </c:forEach>
                      </select>

                  </div>
           </div>
           <div class="form-group">

               <label class="col-sm-2 control-label">主任医生：</label>
               <div class="col-sm-4">
                   <input type="hidden" value="${turnInVo.directorDoctor}" id="doctorId">
                   <select name="directorDoctor" class="form-control" data-parsley-required="true">
                       <c:forEach items="${users}" var="u">
                           <option value="${u.id}" <c:if test="${turnInVo.directorDoctor eq u.id}" >selected</c:if>>${u.name}</option>
                       </c:forEach>
                   </select>

               </div>
               <label class="col-sm-2 control-label">发病日期：</label>
               <div class="col-sm-4">
                   <input name="situationDate" class="form-control Wdate" id="situationDate"  readonly onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" value='<fmt:formatDate value="${turnInVo.situationDate}" pattern="yyyy-MM-dd"/>' />
               </div>
           </div>
           <div class="form-group">

               <label class="col-sm-2 control-label">&nbsp;</label>
               <div class="col-sm-4">
                   <div class="demo-button">
                       <input id="btnSubmit" class="btn btn-success btn-rounded col-lg-12" type="submit" value="保 存">
                   </div>
               </div>
           </div>

       </form:form>

<script src="${ctxStatic}/js/doctor/turnInForm.js"></script>
